package com.alex.insistence.rest.util;

import org.jeecgframework.core.common.model.json.DataGrid;

import com.gomore.jeecg.jpa.query.QueryDefinition;

public class DataPageUtil {

  public static DataGrid fromQueryDefinition(QueryDefinition definition) {
    DataGrid dg = new DataGrid();
    dg.setPage(definition.getPageNumber() + 1);
    dg.setRows(definition.getPageSize());
    return dg;
  }

}
